<style type="text/css">
.arrow-top {
  width: 0;   
  height: 0;   
  border-left: 10px solid transparent; 
  border-right: 10px solid transparent;
  border-bottom: 10px solid #000; 
  font-size: 0;  
  line-height: 0;
  margin-left:1.3rem
}
</style>
<div class='fui-page  fui-page-current'>
	<div class='fui-content'>
		<div class="topbg" style="position: relative;width:100%;background: {{main.syscolor || '#7c1cc9'}};height:3.3rem">
			<div class="fui-cell-title bold" style="padding-top:0.8rem;color:#fff">[{{pagedata.yewu.title}}]-服务下单</div>
		</div>
		<div class="jy-content" style="margin-top:-1.5rem">
		<div class="fui-cell-group">
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:auto">联系人姓名</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入联系人姓名" ng-model="pagedata.post.name" /></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:auto">联系人电话</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入联系人电话" ng-model="pagedata.post.mobile" /></div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-label" style="width:auto">代办的企业</div>
				<div class="fui-cell-info">
				<select ng-model="pagedata.post.merchid" class="form-control tpl-province">
					<option value="" selected="selected">请选择</option>
					<option ng-repeat="item in pagedata.mymerchs" value="1" ng-selected="pagedata.post.merchid==item.id">{{item.title}}</option>
				</select>
				<div class="help" style="padding-top:0.2rem;font-size:0.6rem;color:#999">
				可以管理添加多个企业！
				<a class="syscolor" href="javascript:;" ng-click="access_json('jy_daibao/mymerch/')">点击管理</a>
				</div>
				</div>
			</div>
			<div ng-if="pagedata.post.year" class="fui-cell">
				<div class="fui-cell-label" style="width:auto">代办年份</div>
				<div class="fui-cell-info r">
				{{pagedata.post.year}}年
				</div>
			</div>
		</div>
		<div class="fui-navbar-tip" ng-if="pagedata.buyxieyi.isopen==1" style="height:1.8rem">
		<div class="fui-cellone sm" style="padding:0">
			<div class="fui-cellone-info" style='line-height:1.4;font-size:0.7rem'>
				<span class="text"><input type="checkbox" ng-checked="pagedata.post.checked==true" ng-model="pagedata.post.checked" name="checkbox" class="fui-radio fui-radio-danger cartmode check-item"/></span>
				<span class="text" ng-click="pagedata.show_xieyi=true;">请先阅读【{{pagedata.buyxieyi.title || '订单须知'}}】</span>
			</div>
		</div>
		</div>
		<div class="fui-navbar order-create-checkout">
			<a href="javascript:;" class="nav-item total" style="text-align:left;padding-left:0.5rem">
				<span  class="text-danger bigprice">￥ 
					<span class="totalprice" style="font-size:1.2rem">{{price(pagedata.post.fee) || '0.00'}}</span>
				</span>
			</a>
			<a ng-if="!pagedata.order_id" href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="pagedata.pay_submit(pagedata.post,'jy_daibao/uporder/post/','jy_daibao/order//status=1')" >
				<div class="fee-tagup-nav">
					确认下单
				</div>
			</a>
			<a ng-if="pagedata.order_id" href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="access_json('jy_daibao/order/')" >
				<div class="fee-tag-nav">
					查看订单
				</div>
			</a>
		</div>
	</div>
	</div>
</div>
<div ng-if="pagedata.show_xieyi" class="popup">
	<div class="popup-body">
		<div class="popup-center">
			<i class="closed icon icon-cuowu" style="font-size:1.2rem;top:105%;" ng-click="pagedata.show_xieyi=false"></i>
			<div class="content-images" style="padding:0.5rem;height:20rem; overflow-y:scroll;">
					<div class="title bold" style="font-size:0.8rem">{{pagedata.buyxieyi.title||'订单须知'}} / <small>Read Ggree</small></div>
					<div class="text" style="padding-top:0.5rem;font-size:0.7rem" ng-bind-html="trust(pagedata.buyxieyi.content)">
					</div>
			</div>
			<div class="modal-footer">
				<div ng-click="pagedata.show_xieyi=false;pagedata.post.checked=true" class="mod-check" style="width: 100%; margin: 0;">我已阅读</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
scope.pagedata.pay_submit=function(post,post_url,complete_url){
	if(scope.pagedata.yuejiemid>0 && !scope.pagedata.post.yuejie_select){
		scope.pagedata.yuejie_show=true
		scope.$evalAsync();
		return false;
	}
	scope.post_json(post_url,post,function(result){
		if(result.order_id){
			scope.pagedata.order_id=result.order_id;
			scope.$evalAsync();
			scope.tool.pay(result.pay_id,function(res){
					if(res.type=='success'){
						scope.message('支付成功！','success',complete_url);
					}else{
						scope.message('支付失败！','success',complete_url);
					}
			},'','',complete_url,complete_url);
		}
	});
}
scope.pagedata.upprice=function(){
	var groupid=scope.pagedata.post.groupid
	var pid=scope.pagedata.post.pid
	scope.pagedata.post.nowitem=scope.pagedata.groups[groupid].list[pid];
	scope.pagedata.post.nowitem=scope.pagedata.post.nowitem?scope.pagedata.post.nowitem:{}
	scope.pagedata.post.vip_price=scope.pagedata.post.nowitem.vip_price;
	scope.pagedata.post.old_price=scope.pagedata.post.nowitem.price;
	scope.pagedata.post.order_types=scope.pagedata.post.nowitem.order_types;
	if(scope.pagedata.isvip==1){
		scope.pagedata.post.totalprice=scope.pagedata.post.nowitem.vip_price;
	}else{
		scope.pagedata.post.totalprice=scope.pagedata.post.nowitem.price;
	}
	if(scope.pagedata.pluginset.is_dianfee==1 && scope.pagedata.post.type==1){
		scope.pagedata.post.totalprice=0;
	}
	if(scope.pagedata.post.oldpid!=scope.pagedata.post.pid || !scope.pagedata.post.remark){
		scope.pagedata.post.remark=scope.pagedata.post.nowitem.desc;
	}
	scope.pagedata.post.oldpid=scope.pagedata.post.pid;
	console.log(scope.pagedata.post);
	scope.$evalAsync();
}
</script>